load("//tools/build_defs/android:fb_core_android_library.bzl", "fb_core_android_library")
load("//tools/build_defs/oss:profilo_defs.bzl", "profilo_path")
load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native")

fb_core_android_library(
    name = "utils",
    srcs = glob(
        ["*.java"],
        exclude = ["*Test.java"],
    ),
    visibility = [
        profilo_path("java/test/com/facebook/profilo/core:core"),
    ],
    deps = [
        profilo_path("deps/third-party/java/powermock:powermock"),
        profilo_path("deps/jsr-305:jsr-305"),
        profilo_path("deps/proguard:annotations"),
        profilo_path("java/main/com/facebook/profilo/logger:logger"),
        profilo_path("deps/third-party/java/junit:junit"),
    ],
)

fb_native.robolectric_test(
    name = "logger",
    srcs = glob(["*Test.java"]),
    contacts = ["oncall+loom@xmail.facebook.com"],
    deps = [
        ":utils",
        profilo_path("deps/jsr-305:jsr-305"),
        profilo_path("java/main/com/facebook/profilo/core:core"),
        profilo_path("java/main/com/facebook/profilo/core:events"),
        profilo_path("java/main/com/facebook/profilo/logger:logger"),
        profilo_path("deps/third-party/java/assertj:assertj-core"),
        profilo_path("deps/third-party/java/guava:guava"),
        profilo_path("deps/third-party/java/junit:junit"),
        profilo_path("deps/third-party/java/powermock:powermock"),
    ],
)
